import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';

class SvgUtils {
  SvgUtils._();

  static SvgPicture assetName(String assetName,
      {double? width, double? height, BoxFit fit = BoxFit.contain}) {
    if (!assetName.endsWith('.svg')) {
      assetName = '$assetName.svg';
    }
    return SvgPicture.asset(
      'assets/svg/$assetName',
      width: width,
      height: height,
      fit: fit,
    );
  }
}
